Skip to main content

Full text of "ibm :: 370 :: fe :: GA22-6983-0 Special Feature Description Channel-to-Channel Adapter Mar72"

See other formats


GA22-6983-0 



Systems 



IBM System/370 Special Feature 
Description: Channel-to-Channei 
Adapter 







Preface 



This publication provides a functional description of the 
System/370 channel-to-channel adapter. The System/370 
and System/360 channel-to-channel adapters are similar in 
function and in operation. This manual describes all of the. 
System/370 adapter functions that are also provided by the 
System/360 adapter as described in the IBM System/360 
Special Feature Channel-to-Channel Adapter, GA22-6892, 
plus unique System/370 extensions. Reference information 
is included which pertains to the adapter's use, operation, 
and the commands and status data required for assembly 
language programming. 

The reader should possess a basic knowledge of data 
processing systems and, specifically, the IBM System/370. 
Such information can be found, for example, in the 
Introduction to IBM Data Processing Systems, GC20-1684, 
the IBM System/ 360 Principles of Operation, GA22-6821 
and the IBM System/370 Principles of Operation, GA22- 
7000. 

This manual is directed to the user who needs a 
description of the adapter's function and operation, as well 
as to the systems programmer, systems engineer, or 
maintenance personnel who need reference information in 
the writing and maintenance of assembly language programs 
for the channel-to-channel adapter. 



First Edition (March 1972) 

Changes are periodically made to the specifications herein; before using this 
publication in connection with the operation of IBM systems (or equipment), 
refer to the latest System/360 and System/370 SRL Newsletter, GN20-0360, for 
the editions that are applicable and current. 

Requests for copies of IBM publications should be made to your IBM 
representative or to the IBM branch office serving your locality. 

This manual has been prepared by the IBM Systems Development Division, 
Product Publications, Dept. B98, P.O. Box 390, Poughkeepsie, N.Y. 12602. A 
form for readers' comments is provided at the back of this publication. If the 
form has been removed, comments may be sent to the above address. Comments 
become the property of IBM. 

©Copyright International Business Machines Corporation 1972 



Contents 



Channet-to-Channel Adapter 5 

Unit Characteristics 5 

I/O Interface Operation 5 

Mode of Operation 5 

Commands 6 

Data Flow 6 

Status Byte 6 

Sense Byte 6 

Operations ' . 7 

General Sequences 7 

Specific Commands 8 

Halt I/O / Halt Device 11 

System or Selective Reset 11 

System Adapter-Control 11 

Programming Notes 12 

Index 15 



Glossary 



Adapter Compatibility -The capability of the System/370 
channel-to-channel adapter to operate in compatibility 
mode and thereby to properly respond to programs written 
for the System/360 channel-to-channel adapter. 



High-speed Data Mode-Thai data transmission mode of 
adapter operation utilized when two block multiplexer 
channels are interconnected and the adapter has been wired 
to make use of this above-normal rate of data transmission 
during adapter operations. 



Compatibility Mode-Thai adapter mode of operation 
which permits the use of programs written for the 
System/360 channel-to-channel adapter. 



Latch- A unit of circuitry which may be used to store a bit 
of information (0,1) that controls the performance of a 
function. For example, the state of the inhibit compati- 
bility latch controls the operating mode of the adapter. 



Extended Mode-Thai adapter mode of operation provided 
for System/370 operation which adds new commands and 
functions to the System/360 adapter function. 



Select-out- An electronic signal utilized by the System/360 
and System/370 I/O interface in the performance of I/O 
device selection by a channel. The channel must select 
(address) a connected device before requesting the perfor- 
mance of an operation by that device. 



Channel-to-Channel Adapter 



The channel-to-channel adapter is a special feature available 
on many System/360 and System/370 models that include 
integrated channels and on the standalone IBM 2860 
Selector Channel which is utilized by the larger IBM 
systems. The function of the channel-to-channel adapter is 
fundamentally the same in both System/360 and System/ 
370, however, additional capability has been added to the 
System/370 channel-to-channel adapter, (hereafter referred 
to as the adapter). This manual applies only to the 
System/370 adapter; for information on the System/360 
adapter see IBM System/360 Special Feature Channel-to- 
Channel Adapter, GA22-6892. 

System/360s may connect an installed channel-to-channel 
adapter to a System/370 channel and continue to utilize 
the existing program. When a System/370 installed adapter 
connects to a System/360 channel, provision is made 
through a compatibility mode of operation to use either the 
existing System/360 program or the System/370 program. 
(See "Mode of Operation.") System/370s using the IBM 
2860 Selector Channel can install only the System/360 
adapter; the adapter cannot be installed in the 2870 byte 
multiplexer or 2880 block multiplexer channels. However, 
because the adapter connects two channels by means of the 
standard channel to control unit I/O interface, it can 
connect the system in which it is installed to any other 
channel on any model of the System/360 or System/370. 
For more information on the I/O interface, see IBM 
System/360 and System/370 I/O Interface-Channel to 
Control Unit, Original Equipment Manufacturers' Informa- 
tion, GA22-6974. 

The channel-to-channel adapter provides the data path 
and the synchronization for a data transfer between two 
channels. Normally, the adapter is used to connect two 
channels associated with different processing units, thus 
establishing a loosely coupled multiprocessing (MP) system. 
(Note: Only the selector or block multiplexer channels can 
be utilized by the adapter to connect two channels within 
the same System/370 Model 145 system.) 

The adapter makes each channel appear as a control unit 
to the other channel (at least one control unit position on 
each of the connected channels is required). The adapter is 
selected and responds in the same fashion as any control 
unit, and, in essentially the same manner as a control unit, 
it accepts and decodes commands from the channel. 
However, the adapter differs from a control unit in that it 
does not use these commands to operate and control 
input/output devices; instead, it uses them to open a path 
between the two channels it connects and then synchro- 
nizes the operations performed between the two channels. 



The two channels connected by the adapter are designated 
channel X and channel Y. The channel X designation is 
applied to the channel of the system in which the adapter is 
physically located and powered. When channel X power is 
off, the adapter is disabled; however, channel Y may 
continue to operate with, its other control units. 

UNIT CHARACTERISTICS 

I/O Interface Operation 

The adapter operates in burst mode. Once data transfer 
begins, a logical connection between the channels is 
established for the duration of the operation. Data trans- 
mission proceeds at a byte rate established by the speed of 
the slower channel. 

Mode of Operation 

The adapter on System/370 models that include integrated 
channels has two modes of operation: compatibility mode 
and extended mode. 

Compatibility Mode 

When the host system (X) is powered up, the adapter 
assumes the compatibility mode. In this mode the adapter 
uses the same commands as the System/360 channel-to- 
channel adapter to permit system operation utilizing 
existing System/360 programs. 

Extended Mode 

In this mode the adapter provides several new features that 
are not available in the System/360 adapter nor in the 
compatibility mode. These features include: 

1. The unit check status bit. 

2. The unit exception status bit. 

3. An attention interruption condition that is mandatory 
and must be cleared either by the receiving channel via a 
test I/O (TIO), a start I/O (SIO), or an I/O interruption; 
or by a halt I/O (HIO), halt device (HDV), or system 
reset from either side. This means that the first 
command to be accepted by the adapter (from channel 
X, for example) causes an attention interruption condi- 
tion to channel Y. No operation with the adapter can be 
performed by channel Y until that attention inter- 
ruption condition is recognized and cleared by channel 
Y, even if a second SIO (from channel Y) issues a 
command which matches with the first command (for 
example, a read X to a write Y.) 



Channel-to-Channel Adapter 5 



4. A halt I/O or halt device instruction, and an interface 
disconnect, selective reset or system reset, which sets the 
associated side of the adapter to not rea'dy and sets the 
intervention required sense bit. Any SIO, other than a 
sense adapter-state command, causes the adapter to 
become ready and a device end interruption to be 
generated on the other side of the adapter. 

5. New commands: Modified no-operation, sense adapter- 
state, and write end-of-file. 

High-Speed Data Mode 

The data transfer rate of the adapter may be increased by 
operating the adapter in high-speed data mode. The adapter 
is plugwired at installation time by the service personnel to 
run in this optional mode, with the restriction that channels 
X and Y must implement the data-in and data-out tag lines 
in the I/O interface, that is. channels X and Y must be 
block multiplexer channels. Otherwise, the high-speed data 
mode cannot be used. (See "Wrong Length Record" under 
"Programming Notes.") 



COMMANDS 

Figure 1 shows the commands that are accepted by the 
adapter. 



Basic Command 






Bi 


Poiition 











1 


2 


3 


A 


5 


6 


7 


r«t KO (Note 1) 


- 


— 


- 


- 














Write 





M 


M 


M 


M 


M 







Write End-of-File(Note2) 


1 

















Read 


M 


M 


M 


M 


M 


M 


1 





No-operation 


- 





- 


- 


- 





1 




Control 


M 


M 


M 


M 


M 


1 


1 




Sent* Adapter Stat* (Note 3) 


- 


- 


- 








1 








Modified No-operation 
(Disoble Compatibility) 


1 


1 


- 


- 


- 





1 




Modified No-operation 
(Enable Compatibility) 





1 


- 


- 


- 





1 




Seme Command Byte 


- 


- 


- 


1 





1 








Read Backward 


M 


M 


M 


M 


1 


1 









1 . Thr test I/O command is generated only when the test I/O instruction is 

jdt essed to the adopter; the all-zero command is invalid in o channel 
command word (CCW). 

2 In compatibility mode, this command decodes as a normal write command. 
3. In compatibility mode, this command decodes and operates like the sense 

command-byte command. 

4 . "— " indicates that the bit may be either 1 or 0; tf.e state of the bit is 

irrelevant. 

5 "M" indicates that the bit is a modifier bit and may be either 1 or 0; the 
modifier bits are made available to the programmer by use of the sense 
command-byte command. 



Data Flow 

The adapter has two nine-bit (eight data bits plus parity) 
buffer registers, one for each side of the adapter. These 
buffers do not have a common input; an error detected on 
one side of the adapter will not necessarily make the 
adapter unavailable to both sides (both channels). The 
adapter also has two command registers. During a sense 
command-byte operation, the command byte from one side 
is sent to main storage of the other side. The programmer 
can, therefore, inspect the command issued by the other 
channel and he can also use the modifier bits in any way he 
chooses. 



Status Byte 

The adapter uses six of the eight available status byte bits 
defined in IBM System/360 Principles of Operation. 
GA22-6821. (For additional information, sec "Op- 
erations.") 

Bit Indication 






Attention 


i 


Not used 


2 


Not used 


3 


Busy 


4 


Channel end 


5 


Device end 


6 


Unit check* 


7 


Unit exception* 



* Not used in compatibility mode 



Sense Byte 

The adapter uses seven of the eight available sense byte bits 
to indicate to the channel the cause of a unit check 
condition presented at status time. The sense bits are reset 
by any command issued to the adapter except test I/O, 
no-operation, write end-of-file and sense adapter state. The 
sense bits are not available to the program in compatibility 
mode because the sense adapter state command cannot be 
executed in this mode. 

Bit Indication 

Not used 

1 Intervention required 

2 Buffer data check (other side of adapter) 

3 Equipment check 

4 Selection check (other side of adapter) 

5 Control sequence check (other side of adapter) 

6 Status generation check (other side of adapter) 

7 Interface disconnect* 



Figure 1. Valid Adapter Commands 



* Normally produced by execution of HIO or HDV instruction. 



Sense Bit Definitions 

Intervention Required: The other side of the adapter is not 
ready because of a system reset, selective reset, or interface 
disconnect. 

Buffer Data Check: Incorrect parity was detected during 
data transfer; the error was detected at the data buffer on 
this side of the adapter. 

Equipment Check: This side of the adapter detected a logic 
error. Four possible error conditions may be detected by 
either side of the adapter: selection check, control sequence 
check, status generation check, and command check 
(incorrect command code parity). 

Selection Check: The adapter is selected but the select-out 
line is propagated at the same time. 

Control Sequence Check: An adapter control sequence did 
not occur in the proper order; this is a logic error. 

Status Generation Check: The adapter generated a status 
byte with incorrect parity. 

Interface Disconnect or Selective Reset: A selective reset, 
or interface disconnect (normally the result of a HIO or 
HDV instruction) has been issued to the other side of the 
adapter. 



OPERATIONS 

General Sequences 

All adapter data transfer operations are initiated by a start 
I/O instruction. Note that some models execute start I/O 
fast release (SIOF) as start I/O; the results of the 
instruction execution are the same. Successful execution of 
the start I/O instruction causes the channel to fetch a 
channel address word (CAW) from main storage. The CAW 
specifies the location in main storage where the channel 
program begins, that is the address of the first byte of the 
first channel command word (CCW). 

Channel Command Word 
CCW 



Command 
Code 



Data Address 



7 8 



31 



I 



Flags 



000 




Count 



The CCW specifies all the information necessary for an 
operation to be executed. For a complete description of the 
CCW, see the IBM System/360 Principles of Operation, 
GA22-6821. 

The CCW fields that are of special significance to adapter 
operations include: 

Command Code: This field specifies the operation to be 
performed, and is sent to the adapter upon the initiation of 
the operation. 

Flags: Bit 32 is the chain-data flag and bit 33 the 
chain-command flag. When bit 32 is set to and bit 33 is 
set to 1, command chaining is specified. In adapter 
operations, command chaining may be performed by one of 
the two channels or by both simultaneously. Note, how- 
ever, that operations performed using the adapter occur 
functionally in pairs. If a channel issues commands in an 
illogical sequence, the out-of-sequence command is not 
accepted. For example, if both channels are chaining and 
channel X initiates a read operation but channel Y answers 
with a control command, the control command is rejected 
with attention and busy status. The adapter disconnects 
from channel Y but remains connected to channel X until 
channel Y sends a correct response, or a halt I/O instruc- 
tion, or system reset or 1PL is issued. 

Bit 34 is the suppress-length-indication (SLI) flag. It 
controls whether an incorrect length condition is to be 
indicated to the program. In order to perform command 
chaining, it is always necessary to include the SLI flag in 
one of the CCWs. If the byte counts in the CCWs of each 
side are equal, the adapter always causes an incorrect length 
condition in the channel performing the write operation. If 
the SLI flag is not present, this condition inhibits command 
chaining. See "Programming Notes." 



32 



36 37 39 40 



47 48 



63 



Operation Sequences 

When a channel issues a command to the adapter, the 
adapter responds by sending to the channel a status byte 
indicating the status of the adapter. If the adapter is 
available and the operation is an "immediate" one, that is, 
one not requiring a data transfer, the adapter responds with 
a status byte indicating that the command will be executed 
and the channel is free for the next operation (condition 
code 1). However, if the operation is one that requires data 
transfer, the adapter responds with a status byte indicating 
that the command has been accepted, the operation is 
proceeding, and the channel is not free (condition code 0). 
If the adapter is not available condition code 3 is set. (See 
"Online and Offline Modes.") 



Channel-to-Channel Adapter 7 



The type of command determines which adapter opera- 
tion ensues after the command is decoded. For example, a 
no-operation command causes the adapter to return a status 
byte containing channel end and device end and to 
disconnect from the channel immediately after accepting 
the command. Ceriain other commands issued by a channel 
to the adapter can be executed only if the other channel to 
which the adapter is connected issues an appropriate 
command. For example, a read or read backward operation 
issued by one channel can be executed by the adapter only 
after a write command has been issued to the adapter by 
the other channel. Likewise, a write command issued as the 
initial part of an operation requires an accompanying read 
command. 

When the adapter decodes from one channel a command 
that requires an appropriate command from the other 
channel, the adapter signals the other channel (via an 
attention interruption) that an operation is waiting in the 
adapter. The other channel program responds with a sense 
command, which causes the adapter to transmit (to the 
channel issuing thrt command) the command byte issued 
by the initiating channel. The other channel's CPU program 
then examines the byte to determine what command 
should be issued in response to the adapter, and proceeds to 
issue that command. Only after both commands have been 
accepted by the adapter does the adapter operation 
continue to completion. 

During I/O interruptions and during execution of start 
I/O, test I/O, halt I/O, and halt device, the unit status byte, 
under certain conditions, is stored as bits 32-39 of the 
channel status word (CSW). The CSW is stored at location 
64 (40 hex) in main storage. The conditions under which 
the unit status byte is stored are described in IBM 
System/360 Principles of Operation, GA22-682 1 . 



Ready and Not Read Conditions (Not Used in 
Compatibility Mode) 

The adapter can be made not ready, that is, unavailable to 
one or both channels for command execution. An interface 
disconnect, a selective or system reset, or an equipment 
check from channel X creates a not ready condition on the 
X side of the adapter. While the X side is not ready, any 
command (other than sense adapter state) issued by 
channel Y is rejected with a unit check indicated in the 
initial status. Any command (except test I/O or sense 
adapter state) issued by channel X makes the X side of the 
adapter ready. The not ready to ready transition causes a 
device-end interruption to channel Y to indicate that the X 
side is ready and available for operation. 

Both sides of the adapter perform the same functions. In 
the preceding explanation and in the remainder of the 
manual, "X" and "Y" may be interchanged to show the 
operation for either side of the adapter. 



Specific Commands 

Control 

The control command provides for communicating control 
information between the channels. To serve this purpose, 
the five modifier bits of the command may be coded as 
desired. Proper use of the control command can eliminate 
situations in which a channel is kept busy with a command 
issued to the adapter while waiting for the proper command 
response (for example, an X read waiting for a Y write.) 

When the control command is issued to the adapter, it is 
always an immediate command. In response, a sense 
command-byte command must be issued by the other 
channel to free the adapter and return it to the idle state. A 
control command from one channel may, however, receive 
a busy response because the other channel has previously 
issued a command. 

Control Issued to an Idle Adapter: If channel X issues the 
control command, the complete command byte is set into 
the channel X command register of the adapter which sends 
channel end with initial status to free channel X. A control 
immediate latch is set on the X side, and an attention 
interruption is presented to channel Y. Channel Y, when 
free, can accept the attention as defined in IBM System/ 
360 Principles of Operation, GA22-682 1 . 

To free the adapter, a sense command-byte command 
must be issued by channel Y. At the termination of the 
sense command-byte command from channel Y, a device 
end for channel X is generated by the adapter. 

Control Issued to a Busy Adapter: A control command 
issued by channel X receives busy status for the following 
reasons: 

1 . A previously issued control command by channel X has 
not been cleared. The response is the busy bit alone. 

2. A previously issued control command by channel X was 
cleared with a channel Y sense command-byte com- 
mand, but device end has not yet been accepted by 
channel X. The adapter responds with busy and device 
end. This clears the device end and leaves the adapter 
idle. 

3. The control command is issued by channel X after 
channel Y has issued a command. The response is 'busy' 
and 'attention! The 'attention', after being presented, no 
longer brings up the interface request-in tag to try to 
interrupt the CPU. If channel X subsequently issues 
another command, other tha- sense command-byte, or a 
matching command, the response is again. 'busy' and 

'attention'. 

Control Issued to a Not Ready Adapter (Not Used in 
Compatibility Mode): When the Y side is not ready, a 
control command from channel X to the adapter receives 
unit check status. 



Sense Adapter State (Not Used in Compatibility Mode) 

This command is used to interrogate the adapter to 
determine the cause of a unit check. The sense byte is sent 
as data to the channel. The definition of the sense bits sent 
to the channel is listed under "Significant Sense Bit 
Combinations." Channel end and device end are presented 
as final status. 

The sense adapter-state command receives a busy re- 
sponse if there is an outstanding control command at the 
adapter. 

Significant Sense Bit Combinations: 

1. All sense bits off indicates that the other side is ready. 
This is the normal condition. 

2. Bit 1 on (intervention required) and bit 7 off (interface 
disconnect or selective reset) indicates that the other 
side is not ready due to a system reset on that side. 

3. Bit 1 on and bit 7 on indicates that the other side is not 
ready due to a halt I/O, halt device, or selective reset. 

4. Bit 3 on (equipment check) indicates a hardware failure 
on this side of the adapter. Bits 4, 5, and 6 must be 
interrogated to determine if the other side of the 
adapter is also in error. An all-zeros condition indicates 
that the side executing the sense command has the only 
error. 

5. Bit 2 on (buffer data check) indicates that the data 
buffer on this side of the adapter detected incorrect 
parity. The operation is not stopped, but unit check is 
presented with the final status. 

Sense Command-Byte 

The sense command-byte command is used by one system 
to examine the command byte of the other system. If the 
adapter is idle when the sense command is performed, the 
data byte contains all zeros. For the data byte to contain 
the command byte of the other system, one of the 
following commands must have been issued by the other 
(Y) channel: 

Channel Y Previously Issued Sense Data 

12 3 4 5 6 7 

Adapter Idle 00000000 

Control Ill 

Read Backward .... l 1 

Read 10 

Write 1 

The only exception is encountered when channel X issues 
a sense command-byte command to the adapter before a 
previous control command from channel X has been 
cleared. If the control command has not been answered by 
a sense command from channel Y, then the X sense 
command receives a busy response. If the X control 
command has been answered, but device end has not been 
accepted or has been stacked by channel X, then the X 
sense command receives both busy and device end in the 
initial status byte. This clears the device end. 



Read and Read Backward 

The adapter does not recognize the difference between a 
read and a read backward command. In both cases, the 
primary function of the adapter is to transmit data bytes to 
the initiating channel. It is the function of the channel to 
place the data bytes in main storage in the proper order. 

Read Issued to an Idle Adapter: When a read or read 
backwards command is issued to an idle adapter, the issuing 
channel (X, for example) receives an all-zeros initial status, 
and then the operation is delayed while waiting for channel 
Y to respond with a write command. An attention 
interruption is immediately sent to channel Y indicating 
that an operation is waiting. The complete read command is 
stored in the adapter's X command register and is available 
to the Y side by means of the sense command-byte 
command. 

Read Issued to a Busy Adapter: There are three responses 
to a read command issued by channel X. 

1 . If a previously issued X control command has not been 
cleared (the X control command is still valid), the 
adapter responds to initial selection with busy status. 

2. If there is outstanding status information stored in the X 
side of the adapter, the response includes 'busy' in the 
status. This status could be channel end and device end 
from a previous operation that was stopped with a halt 
I/O. It could also be device end from a previous X 
control command that was cleared by a Y sense 
command-byte command but that had not been 
accepted by channel X; or the status may be a device 
end produced by the Y side going from the not ready to 
the ready state. 

3. If channel Y has previously issued a read, read back- 
ward, or control command, then busy and attention 
status is the response to the X read command. If the 
attention was not previously accepted by channel X, the 
X read command clears attention as an interrupting 
condition, although it still appears as a response to 
another X read command until the previously issued 
read command by channel Y is satisfied by an X write 
command. (A Y write is only satisfied by an X read, and 
a Y control is only satisfied by an X sense command- 
byte command, etc ). 



Read When EOF is Issued (Not Used in Compatibility 
Mode): If end-of-file is set on the X side of the adapter by a 
previously issued Y write EOF command, an X read is 
rejected with the unit exception bit presented in the initial 
status byte. 

Write 

The adapter accepts data from the writing (initiating) 
channel and transmits the data to the reading (non- 



Channel-to-Channel Adapter 9 



initiating) channel. A write command might be issued to 
either an idle or a busy adapter. In either case, the response 
is the same as if a read command had been issued. See 
"Read Issued to an Idle Adapter" and "Read Issued to a 
Busy Adapter." 

If a read command is issued by channel Y before a write 
command is issued by channel X, and if the attention status 
on the X side has been accepted, both operations are 
performed. See also "Adapter Compatibility." In compati- 
bility mode, channel X receives a zero status in response to 
its command whether attention is accepted or not. The 
adapter requests a data byte from channel X and transmits 
it to channel Y. This operation continues until either 
channel signals 'stop'. If the operation is stopped by the 
reading channel, one more byte of data than is required is 
sent to the adapter by the writing channel. (Two more 
bytes are required if operating in high-speed data mode.) 

Write End-of-File (Not Used in Compatibility Mode) 

The write EOF command is used to signal to a read or read 
backward command on the other side of the adapter that 
no more data is to be sent. This command is especially 
useful when trying to stop an operation where individual 
writes are being issued to chained reads. The write EOF 
command sets an EOF latch in the other side of the adapter 
to indicate that no more d ita will be transmitted and to 
break the read chaining. 

When channel X issues a write EOF, a pending read on 
channel Y receives channel end, device end, and unit 
exception ending status before any data has been trans- 
ferred, but after a zero initial status is sent to channel Y. If 
the write EOF is issued before the read and initial status are 
presented, the unit exception bit is presented alone and the 
read command is rejected. 

The write EOF command is treated on the writing side as 
a no-operation command in that channel end and device 
end are returned in the initial selection status and the 
adapter is available for more commands. 

Because a write EOF is only meant to terminate a read 
(or read backwards), the EOF condition is reset if any 
command other than read is issued on the other side. In this 
case, the EOF condition is never indicated and is lost. 

If after a write EOF is issued, another command such as 
control iS given on the same channel and before a read is 
issued on the other channel, the attention interruption 
condition is kept pending until after unit exception is sent 
in response to the read command. 

Write EOF commands are not stackable, that is, if three 
write EOF commands are issued by channel X, then 
channel Y issues two read commands, only the first read 
command receives a unit exception. 

An interface disconnect, selective or system reset on 
either side of the adapter resets the EOF condition. 



No-operation 

The no-operation command in the adapter is always an 
immediate command. It has no effect on the adapter except 
for clearing an end-of-file (EOF) condition if that condition 
existed before the execution of the no-operation command. 
The response that is sent to the channel if this command is 
issued to an adapter that is busy or has an outstanding 
status is the same as that stated for read command. 

If channel X issues a no-operation command to an idle 
adapter, channel X receives a status response containing 
channel end and device end, and the adapter remains free to 
the channel. 

Modified No-operation 

The response of the channel-to-channel adapter to the 
modified no-operation command is the same as the re- 
sponse to a no-operation command except for the setting or 
resetting of the extended mode condition. 

The adapter is normally in compatibility mode 
(System/360 adapter-type operation). The issuing of a 
modified no-operation (disable compatibility, op code C3), 
sets the inhibit compatibility latch on that side of the 
adapter. Inhibit compatibility being set by either or both 
sides of the adapter forces the adapter into extended mode 
(noncompatibility mode). A system reset, selective reset or 
a modified no-operation (enable compatibility op code 43 
(hex)) resets the inhibit compatibility latch for that side of 
the adapter, but does not put the adapter back in 
compatibility mode unless the inhibit compatibility latch 
on the other side is also reset. 

Test I/O 

A test I/O instruction (adapter command) may be used by 
the programmer to determine the status of the adapter any 
time the channel is free. The status received indicates the 
condition of the adapter as follows: 

1. A zero status indicates that the adapter is idle. 

2. A busy bit indicates that the adapter is busy with a 
control command which has not been cleared. 

3. If channel Y has previously issued a read, read back- 
ward, write or control that is still in the adapter, and an 
X test I/O command is issued, the adapter responds with 
attention status to channel X. 

4. A device end status response to an X test I/O command 
indicates that a previously issued X control command 
has been cleared or that the other side went from the 
not ready to the ready state. This clears the device end 
status. 

5. A channel end and device end response indicates that a 
previously issued command was stopped by an interface 
disconnect. 

The meaning of the above status conditions is not 
changed when presented as an interruption. 



10 



Attention: A start I/O (other than a sense, write EOF, or a 
no-operation on either side) generates an attention inter- 
ruption on the opposite side if there was not an outstanding 
command already on the opposite side. This attention 
interruption alerts the program that the adapter has an 
active I/O operation on the other side which is awaiting a 
response. After the 'attention' is recognized by the channel, 
this side can issue a sense command-byte command to 
determine what command is active. This is a typical 
sequence of events. 

If two systems are operating so that a start I/O is active 
on channel X and a second start I/O (using a matched 
command) is issued to channel Y before the attention is 
accepted by channel Y, the following occurs depending on 
the mode: 

1. Compatibility mode-the attention interruption is not 
presented but is reset because of the matched 
commands, and the operation proceeds. 

2. Extended mode-the attention interruption to channel 
Y, if not previously cleared by channel Y, is given in 
response to the channel Y start I/O, even if the 
commands match. If the channel Y start I/O is issued 
again (assuming a match) the operation proceeds. 

Halt I/O / Halt Device 

The execution of a HIO or HDV instruction causes an 
interface disconnect. The interface disconnect condition in 
extended mode stops the adapter data transfer and makes 
the adapter not ready. When the adapter recognizes the 
interface disconnect condition, its response to the halting 
channel is immediate. The adapter drops all in-tag lines, sets 
channel end and device end if the reset occurred after initial 
status time and waits for a chance to send the status to the 
halting channel. If the other channel is operating with the 
adapter, it receives channel end, device end, and unit check. 
If this channel issues a sense adapter state command to 
ascertain the cause of the unit check, it receives a data byte 
with bits 1 and 7 on. Bit 1 on indicates intervention 
required (adapter is not ready) and bit 7 on indicates that 
an interface disconnect or selective reset caused the not 
ready condition. 

The interface disconnect sequence in compatibility mode 
causes a channel end and/or device end interruption to the 
channel that issues the HIO even if the halt occurs before 
the adapter has an active command. A halt I/O or halt 
device command terminates any operation in effect on 
either side of the adapter. 

System or Selective Reset 

A system or selective reset is handled like an interface 
disconnect, except that no channel end or device end is sent 
to the issuing channel and the inhibit compatibility latch on 
the side of the system reset is reset. When the adapter is 



powered up, both the X and Y sides receive an automatic 
reset which puts the adapter in compatibility mode. 

A system or selective reset causes the adapter to become 
not ready only if one inhibit compatibility latch is still on; 
this holds the adapter in extended mode. In order to make 
the adapter ready again, it is necessary to issue a read, read 
backward, write, write end-of-file, control, or no-operation 
command to the adapter. For example, if channel X issues a 
system reset, the X side is not ready until channel X issues 
one of the commands just mentioned. All of the channel Y 
commands except sense adapter state are rejected with unit 
check as long as the X side remains not ready. When an X 
command makes the X side ready, a device end interruption 
occurs on channel Y indicating the adapter is ready. 

When a device end is pending or stacked and the adapter 
is made ready on the other side, the ready device end is 
saved. After the pending device end is cleared, the adapter 
interrupts with the ready device end. When the adapter has 
a pending or stacked device end and a saved ready device 
end interruption, and the adapter is made not ready, the 
saved device end is reset and only the pending or stacked 
device end occurs. The state of the X adapter ready latch 
has no effect on commands issued by channel X. The X 
ready latch only affects channel Y commands. 

System Adapter-Control 

Online and Offline Modes 

The adapter provides an I/O interface switch, located on 
the operator's console, to allow the adapter to be logically 
removed from the Y system. Once the adapter has been 
removed (disabled), it will be unavailable to the Y side. An 
unavailable adapter does not respond to its address if 
selection is attempted but always propagates select-out. 
(Note: In some System/370 models, the I/O interface 
switch may logically disconnect both the X and the Y 
systems.) 

A green indicator labeled I/O INTF DSBLD indicates that 
the adapter is offline. This indicator is lit only if the 
following conditions are satisfied on both sides of the 
adapter at the same time: 

1. Neither interface is operating with a channel (both 
operational-in tags are down). 

2. Neither interface is chaining commands. 

3. Neither interface has pending or stacked status of any 
type. 

4. Neither adapter side has a control command out- 
standing. 

With the I/O interface switch set to DSBL and all of the 
above conditions satisfied simultaneously, the indicator 
lights (indicating that the adapter is then unavailable to the 
channel Y side). The adapter remains in this condition until 
the switch is moved to ENBL. (See Figure 2.) 



Channel-to-Channel Adapter 1 1 



I/O Intarfoe* lovor Swtroh 



fctltloo 


Oparotien 


Information 


Enobla 


Syttam powar>on sequence ii complete. 
I/O interface diiebled indicator ii on. 
Move lever to enable poiltion. 
I/O intarfoe* disabled indicotor itotui 
il off 


Adaptor it aval labia to program. 


Dltobl. 


Operator message specifying removal of 
adopter from uh mult be tent re both 
lyt terns. 

Move lever to disable position. 

I/O interface disabled indicator ttatui 
il on. 


Adaptor It disabled when the lever 
Il In dlKibla potltlon and the dis- 
abled Indicator It on. 



I/O Interface Disabled Indicator 



Tltl* 


Stotut 


Information 


I/O 

INTF 

DSILD 


On 


The adapter Ii not reody ond the I/O Intarfoea lever switch it 
In the disable position. 


Off 


Tha odoptar Ii anablod and aval labia but ready itatui It o 
program function. 



Figure 2. Adapter Controls on Operator Console 



Power-off and Power-on Procedures 

To turn off power, proceed as follows: 

1. Send to both systems operator messages that specify 
removal of the adapter from use. 

2. Move the I/O interface switch to DSBL. 

3. Wait for the I/O INTF DSBLD indicator (green) to light. 

4. Depress the power-off pushbutton. 

The reversal of the above procedure is used for power on: 

1. Depress the power-on pushbutton. 

2. I/O INTF DSBLD indicator should come on. 

3. Move the I/O interface switch toENBL. The I/O INTF 
DSBLD indicator should go out. 



Initial Program Loading (/PL) 

During the initial program loading operation, a system reset 
pulse precedes the selection of the adapter. (See also 
"Adapter Compatibility.") The reset pulse causes the 
adapter to become not ready; any other outstanding 
operation on the other side of the adapter is terminated 
with channel end and device end sent to a read or write 
operation and device end sent to a control operation. 
Another device end is presented because the adapter on the 
IPL side went from not ready to ready and then attention 
status is presented because of the IPL read command. The 
Y side of the adapter must respond with a write command 
alter 'attention' is accepted in order to complete the IPL. 

PROGRAMMING NOTES 

The following information is elaborated upon to explain 
operations that are peculiar to the adapter. 



Adopter Compatibility 

In order to operate the adapter on System/370 models that 
include integrated channels and use programs originally 
written for the channel-to-channel adapter previously 
announced for the System/360, some of the functions 
provided for the adapter must be disabled. Two inhibit 
compatibility latches are provided, one for each side of the 
adapter. An inhibit compatibility latch is set by a modified 
no-operation command (11- --Oil). When either or both 
inhibit compatibility latches are set, the adapter is in 
extended mode. 

An inhibit compatibility latch is reset by system reset, 
selective reset, or by another modified no-operation 
command (01- --Oil). When both inhibit compatibility 
latches are reset, the adapter is in compatibility mode and 
can operate with System/360 adapter programs. The 
following conditions become effective in compatibility 
mode: 

The Write End-of-File Command is Deleted-U the 
command for write end-of-file (1XXXXX01) is presented 
to the adapter, it will be decoded as a standard write 
(0MMMMM01). 

The Sense Adapter-State Command is Deleted-U the 
command for sense adapter state (XXX00100) is presented 
to the adapter, it is decoded as a sense command-byte 
command (XXX10 100). 

The Unit Check and Unit Exception Status Bits are 
Deleted-The latches used to present these bits are inhibited 
in compatibility mode. 

The Ready Latches for Both Sides of the Adapter are 
Forced to the On State and They are Not Allowed to 
Reset— This means that a not ready to ready device end is 
not presented. 

The Sense Bits are Never Presented to the Channel Because 
there is No Sense Adapter-State Command— The sense bits 
do not stop adapter operation but they do turn on and are 
displayed at the X CPU console. 

The Interface Disconnect Sequence Changes -Channel end 
and device end bits are presented to the halting channel 
even when the halt occurs before initial status time. 

A Read-Write Match is Always Performed-The attention 
status does not have to be cleared before the match is 
performed. 



12 



Command Chaining 

Command chaining may be performed by channel X, 
channel Y, and/or both simultaneously ; however, it must be 
remembered that all operations performed by the channel- 
to-channel adapter occur in pairs. Therefore, an illogical 
sequence of commands may send a status of busy and 
attention to the last channel issuing a command. For 
example, if both channels are chaining and a Y read 
command is matched by a control command from channel 
X, channel X receives 'attention' which causes channel X to 
disconnect from the adapter. Channel Y remains connected 
to the adapter until a correct response is received from 
channel X; in this case a write or a write end-of-file 
command. Because the sense commands do not require a 
reply, they should not be chained in answer to a chain of 
control commands. When channel X issues a write, read, or 
chained control command to the adapter, the busy 
condition remains active until a proper response is received 
from channel Y or until either channel issues a halt I/O or 
reset. 

Halt I/O or Halt Device 

The halt I/O or halt device instruction causes a channel end 
and device end to be sent to the channel that issued the 
halt only if initial status was accepted before the adapter 
was halted. (See "Adapter Compatibility.") The channel end 
and device end status is sent to the channel as an 
interruption or in response to a test I/O or start I/O 
instruction. If an interface disconnect is issued after a 
control immediate type command is received, the normal 
initial status for that command is sent to the channel. 

Attention 

If the adapter has a pending attention interruption, a test 
I/O clears the attention as an interruption condition 



although it does not reset the attention status bit. Any 
subsequent test I/O receives the attention status until a 
match" between the channel commands occur. (For 
example, a write on one channel to a read on the other.) 
When the attention bit is a 1 in the adapter status byte and 
the adapter receives a matching command, the attention bit 
is reset and subsequently the adapter executes the oper- 
ation. Under the same condition, if a mismatch occurs, a 
condition code of 01 is set with busy and attention stored 
in the unit status of the CSW. A pending or stacked 
attention on one side of the adapter is reset by an interface 
disconnect issued to either side of the adapter. Zero status 
may be presented to the channel under these conditions. 

Wrong Length Record 

A wrong length record indication can occur under the 
following conditions at the end of the operation. 



Rt 


'.ad on Channel X 


Wrong Length Record 




to Write on 


Indicated on 




Channel Y 


ChX 


Ch Y 


1. 


X count equal to Y count 


No 


Yes 


2. 


X count greater than Y count 


Yes 


Yes 


3. 


X count less than Y count 


Yes 


Yes 


4. 


X count equal to Y count less one 
(compatibility mode) 


Yes 


No 


5. 


X count equal to Y count less two 
(high-speed data mode) 


Yes 


No 



Note: When running with high-speed data mode plugged, 
the adapter prefetches two bytes of data from the writing 
channel before the reading channel can stop data transfer. 
(Figure 3 presents a summary of adapter status responses.) 



Channel-to-Channel Adapter 13 



Status For Channel X After: 




Channel X Issues 
Control Command 
Followed by Y Sense 
Command 


Read 


Channel Y 
Write 


Issues 

Control 


Write EOF 


And 

Channel X 

Issues 


Busy, 
Device End 

(Adapter Idle) 


Busy, 
Attention 


Y-GO*-X 
Reset Attention 


Busy, 
Attention 


Unit Exception 


Read 


Same as Above 


X-GO*-Y, 
Reset Attention 


Busy, 
Attention 


Same as 
Above 


Reset X EOF; 
Attention to Y 


Write 


Same as Above 


Busy, 
Attention 


Same as 
Above 


Same as 
Above 


Reset X EOF; 
Attention to Y. 
Channel End to X 


Control 


Same as Above 


Chan End, 
Device End to 
Both Sides. Unit 
Exception to Y 


Same as 
Above 


Same as 
Above 


Reset X EOF; 
Set Y EOF; 
Channel End, 
Device End to X 


Write EOF 


Device* End 
(Adapter Idle) 


Attention 


Attention 


Attention 


Rese* X EOF; 
Zerc Status to X 

(Adapter Idle) 


Test I/O 


Busy, 
Device End 

(Adapter Idle) 


Busy, 
Attention 


Busy, 
Attention 


Busy, 
Attention 


Reset X EOF; 
Chennel End, 
Device End to X 


No-operation 


Busy, 
Device End 


Force Zero 
Initial Status; 
Y Command 
Byte to X 


Force Zero 
Initial Status; 
Y Command 
Byte to X 


Y Command Byte 
to X; Reset 
Attention. Device 
End Interruption 
toY 


Reset X EOF; 
Zero Command 
Byte to X 


Sense Command 
Byte 


Busy, 
Device End 

(Adapter Idle) 


Busy, 
Attention 


Busy, 
Attention 


Busy, 
Attention 


Reset X EOF; 
Sense Bits to X 


Sense Adapter 
Stote 

- 



• GO = Data Is transferred. 

Nor,: The response given to the channel when the adapter has an outstanding control command (no Y sense command to on X control command) 
is always 'busy 1 , presented as initial status. 

Figure 3. Adapter Status Response Summary 



14 



Index 



adapter 

compatibility (see programming notes) 

installation 5 

in the Model 145 5 

program 5 

status responses 14 
attention interruption [see also programming notes) 

generated by start I/O 1 1 

mandatory 5 
attention status bit 6 

buffer data check sense bit 7 
buffer register 6 
busy status bit 6 

chain data flag 7 

channel command word (CCW) 7 

flags 7 
channel designation 5 
channel end status bit 6 
channel status word (CSW) 8 
channel-to-channel adapter 5 
characteristics, unit 5 
command 6,8 

code 7 

control 8 

issued to busy adapter 8 
issued to idle adapter 8 
issued to not ready adapter 8. 

chaining 13 

modified no-operation 10 

new 6 

no-operation 10 

read 9 

read backward 9 

sense adapter-state 9 

sense command-byte 9 

write 9 

write end-of-file 10 
command register 6 
compatibility 

disable 10 

enable 10 

mode 5 
control sequence check sense bit 7 

data flow 6 
data transmission rates 5 
device end status bit 6 
disable compatibility 10 

enable compatibility 10 
end-of-file (EOF) write command 10 
equipment check sense bit 7 
extended mode 5 

flags, CCW 7 
chain data 7 
suppress length indication (SLI) 7 



general sequences, operation 7 

halt I/O, halt device 1 1 

(see also programming notes) 
high-speed data mode 6 

initial program load (IPL) 12 
installation, adapter 5 
interface disconnect 

sense bit 7 

sequence changes 12 
(see also halt I/O, halt device) 
interruption, attention 5 
intervention required sense bit 7 
I/O interface operation 5 
I/O interface switch 1 1 
I/O INTF DSBLD indicator 1 1 

mandatory attention interruption 5 
mode 

compatibility 5 

extended 5 

high-speed data 6 

of operation 5 
modified no-operation command 10 

new commands 6 
no-operation command 10 

modified 10 
not ready/ready conditions 8 

online, offline modes 1 1 
operation, general sequences 7 
operation, mode of 5 

power off/ power on procedure 12 
program, adapter 5 
programming notes 12 

adapter compatibility 12 



read backward command 9 
read command 9 
read command issued 

to busy adapter 9 

to idle adapter 9 

when EOF is issued 9 
read/write match (see programming notes) 
ready latches (see programming notes) 
ready/not ready conditions 8 
register 

buffer 6 

command 6 



selection check sense bit 7 
selective (system) reset 7,11 
sense adapter-state command 9 

(see also programming notes) 
sense bit combinations 9 



Index 15 



sense bit definitions 7 
sense byte 6 

(see also programming notes) 
sense command-byte command 9 
status byte 6 

status generation check sense bit 7 
status responses 14 
suppress length indication (SLI) flag 
switch, I/O interface 1 1 
system adapter control 1 1 
system (selective) reset 1 1 
System/ 360 program, use of 5 



test I/O 10 
transmission rates, data 5 

unit characteristics 5 
unit check status bit 6 

(see also programming notes) 
unit exception status bit 6 

(see also programming notes) 

write command 9 
write EOF command 10 

(see also programming notes) 
wrong length record 13 



16 



IBM System/370 Special Feature Description: 
Channel-to-Channel Adapter 

Order No. GA22-6983-0 

Your views about this publication may help improve its usefulness; this form 
will be sent to the author 's department for appropriate action. Using this 
form to request system assistance or additional publications, however, will 
delay response. For more direct handling of such request, please contact your 
IBM representative or the IBM Branch Office serving your locality. 



READER'S 
COMMENT 
FORM 



Possible topics for comment are: 

Clarity Accuracy Completeness Organization Index 



Figures Examples Legibility 



What is your occupation? , 

Number of latest Technical Newsletter (if any) concerning this publication: 
Please indicate in the space below if you wish a reply. 



Thank you for your cooperation. No postage stamp necessary if mailed in the U.S.A. (Elsewhere, an IBM office 
or representative will be happy to forward your comments.) 



GA22-6983-0 



Your comments, please . . . 

This manual is part of a library that serves as a reference source for systems analysts, 
programmers, and operators of IBM systems. Your comments on the other side of this 
form will be carefully reviewed by the persons responsible for writing and publishing 
this material. All comments and suggestions become the property of IBM. 



CD 



CO 

< 



Fold 



Fold 



FIRST CLASS 
PERMIT NO. 419 
POUGHKEEPSIE. N.Y. 



Business Reply 

No postage stamp necessary if mailed in the U.S.A. 



Postage will be paid by: 

International Business Machines Corporation 

Department B98 

P.O. Box 390 

Poughkeepsie, New York 12602 




o 
co 



c 

—I 

D 



O 



o 

3" 



> 

a 



5' 
it 

8. 

c 

CO 

> 



Fold 



Fold 



International Bui' less Machines Corporation 

Data Processing Division 

1133 Westchester Avenue, WhKo Plains, New York 10604 

(U.8.A. only) 

IBM World Trade Corporation 

•21 United Nations Plaza, Nsw York, New York 10017 

(International) 



> 
ro 
co 

CD 
00 
CO